import request from '@/utils/request'

// 获取题目列表
export const getQuestionListAPI = params => {
  return request({
    url: '/question/list',
    params
  })
}

// 设置题目状态
export const setQuestionStatusAPI = data => {
  return request({
    url: '/question/status',
    method: 'post',
    data
  })
}

// 发布题目
export const addQuestionAPI = data => {
  return request({
    url: '/question/add',
    method: 'post',
    data
  })
}

// 编辑题目
export const editQuestionAPI = data => {
  return request({
    url: '/question/edit',
    method: 'post',
    data
  })
}

// 删除题目
export const delQuestionAPI = data => {
  return request({
    url: '/question/remove',
    method: 'post',
    data
  })
}

// 题库上传文件
export const uploadFileAPI = data => {
  return request({
    url: '/question/upload',
    method: 'post',
    data
  })
}
